WalletDetailController = BaseController.extend({
	template:'WalletDetail',
	center:'余额',
	
	waitOn:function(){
		let self = this;
		self.merchantInfo = this.currentUser();
		if (self.merchantInfo) {
			return Meteor.subscribe('wallets',{merchant_id: parseInt(self.merchantInfo.id)},{});
		}
    },
    onRendered:function(){
		
	},
	data: function(){
		return {
			wallet:function(){
				return Wallets.findOne();
			},
		};
	}
})

WalletController = BaseController.extend({
	template:'Wallet',
	center:'钱包',
	
	waitOn:function(){
		let self = this;
		self.merchantInfo = this.currentUser();
		if (self.merchantInfo != 'null') {
			return Meteor.subscribe('wallets',{merchant_id: parseInt(self.merchantInfo.id)},{});
		}
    },
    onRendered:function(){
		
	},
	data: function(){
		return {
			wallet:function(){
				return Wallets.findOne();
			},
		};
	},
})
